#ifndef _CPU_CONSOLE_H_
#define _CPU_CONSOLE_H_

 /*
 *  cpu_console/cpu_console.h
 *  
 *              CPU Monitor 
 *
 *    Spring Semester.  044800.    Technion.
 *   Copyright (C) 2006  Evgeny Shulman  and Elizabeth Shtrom 
 */
#include "../cpu_consts.h"
#include "../cpu_monitor.h"
#include "../cpu_functions.h"

#include "../cpu_parse_display/cpu_display.h"
#include "../cpu_parse_display/cpu_cpuid.h"

/* check_<type>
 *   =========== 
 *	checks and display data from the selected type  
 *Input:  fd      - file descriptor of driver file
 *        sel/vec - offset
 *        count   -number entries to display
 *Output:  
 *        0 on success.
*/

int check_tss (int fd);
int check_gdt (int fd, int sel, int count);
int check_idt (int fd, int vec, int count);
int check_ldt (int fd, int sel, int count);
int check_regs (int fd);
int check_cpuid ( int fd );
int check_im   (int fd);


/*
 * entry == -2  display first presented pt
 * entry == -1  display only pgd
 * entry >= 0   display only pt ( entry )
 */
int check_pgd_and_pt (int fd , int index , int count , int entry );

int check_pt         (int fd,unsigned long pgd_entry, int index , int  count );

/*
 * return first presented pgd entry 
 */
unsigned long check_pt_first_present ( unsigned long* pgd_table);



/* check_<todo>
 *   =========== 
 *	executing todo  and display it's results.
 *Input:  fd      - file descriptor of driver file
 *Output:  
 *        0 on success.
*/

int check_im_start (int fd);
int check_im_stop (int fd);
int check_im_read (int fd);
int check_im_read_smp (int fd[], int cpu_to_process);

int check_im_smp(int fd [],int cpu_to_process, int idt_start, int idt_count, int times);




#endif


